#ifndef MEDIACONTROL_H
#define MEDIACONTROL_H

#include <QMediaPlayer>
#include <QString>
#include <QMediaPlaylist>

class MediaControl : public QMediaPlayer
{
public:
    explicit MediaControl(QWidget *parent = 0);
    void setMeidaPath(QString path);
    void setMeidaName(QString name);
    void playMedia(void);

    void FTP_setHost(QString host);
    void FTP_setPort(int post);
    void FTP_setUserName(QString userName);
    void FTP_setPassword(QString password);
    void FTP_setMediaName(QString name);
    void FTP_setMediaPath(QString path);
    void FTP_playMedia(void);
    void setUrl(void);

    void addPlayerList(void);
    void FTP_addPlayerList(void);

    void setCurrentRow(int row);
    void next(void);
    void previous(void);
    int getCurrentRow(void) const;

    void setPlaylist_locaton();
    void setPlaylist_FTP();

private:
    QString mediaPath;
    QString mediaName;
    int currentRow;

    QUrl url;
    QString FTP_host = "192.168.1.100";
    int FTP_port = 2121;
    QString FTP_userName;
    QString FTP_password;
    QString FTP_mediaName = "null";
    QString FTP_mediaPath = "/test/";

    QMediaPlaylist * locatonList;
    QMediaPlaylist * FTPList;
};

#endif // MEDIACONTROL_H
